<script setup lang="ts">
import { RouterView } from 'vue-router'
import HeaderNavigation from './components/HeaderNavigation.vue'

// 导航链接配置
const navLinks = [
  { label: '首页', path: '/' },
  { label: '产品', path: '/products' },
  { label: '服务', path: '/services' },
  { label: '关于我们', path: '/about' },
];

// 用户信息
const userInfo = {
  name: '张三',
  avatar: '', // 可以设置为实际的头像路径
};

// 用户菜单选项
const userMenuItems = [
  { label: '个人资料', action: () => console.log('打开个人资料') },
  { label: '我的设置', action: () => console.log('打开设置') },
  { label: '帮助中心', action: () => console.log('打开帮助中心') },
  { label: '退出登录', action: () => console.log('退出登录') },
];
</script>

<template>
  <div class="app">
    <!-- 使用导航组件 -->
    <HeaderNavigation
      title="示例应用"
      :logoSrc="'/favicon.ico'"
      :navigationLinks="navLinks"
      :userInfo="userInfo"
      :userMenuItems="userMenuItems"
    />
    
    <!-- 主内容区域 -->
    <main class="main-content">
      <RouterView />
    </main>
  </div>
</template>

<style>
/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 24px;
}
</style>
